<template>
  <div class="title_wrap">
    <i class="el-icon-s-grid" @click="say"></i>
    <p>{{ tableTitle }}</p>
  </div>
</template>
<script>
export default {
  //父传子
  props: ['tableTitle', 'SDF'],
  methods: {
    say () {
      // 子传父
      this.$emit('sendRow', '你好')
      // this.$attrs --父组件传给子子组件 除props定义之外属性
    }
  }
}
</script>
<style lang="less" scoped>
.title_wrap {
  display: flex;
  height: 40px;
  border: 1px solid black;
  line-height: 40px;
  text-align: center;
  width: 80%;
  margin: 20px auto 0;
  i {
    width: 40px;
    height: 40px;
    font-size: 40px;
    border-right: 1px solid black;
  }
  p {
    line-height: 40px;
  }
}
</style>
